<template>
  <div>
    <div class="logistics-info-header">
        <div class="logistics-info-header-left">
          
            <div class="logistics-status blue"> 
              <slot name="num" :listN="list.logisticsStatus" >{{list.logisticsStatus}}
              </slot>
            </div>
   

           
          <div class="logistics-company">顺丰速运</div>
          <div class="logistics-no">SF123456789</div>
        </div>
      </div>
      <ul class="logistics-info-list">
        <li v-for="(item,index)  in list.logisticsInfo " :key="index">
          <div class="logistics-info-list-time">{{item.time}}</div>
          <div class="logistics-info-list-content">{{item.content}}</div>
        </li>
      </ul>
      <button>查看物流详情</button>
       
  </div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 组件名称 from '组件路径'
export default {
  props:['list'],
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {}
  },
  //计算属性
  computed: {},
  //侦听器
  watch: {},
  //方法集合
  methods: {},
  //生命周期 - 创建完成（可以访问this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  //beforeCreate() {},   //生命周期 - 创建之前
  //beforeMount() {},    //生命周期 - 挂载之前
  //beforeUpdate() {},   //生命周期 - 更新之前
  //updated() {},        //生命周期 - 更新之后
  //beforeDestroy() {},  //生命周期 - 销毁之前
  //destroyed() {},      //生命周期 - 销毁完成
  //activated() {}       //页面有keep-alive缓存功能时触发这个函数
}
</script>

<style lang="less">
/* 让组件支持less第一步style中添加lang='less' scoped第二步终端执行yarn命令 yarn add less less-loader */
logistics-info {
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0px 0px 10px #eee;
  padding: 10px;
  font-size: 14px;
}

.logistics-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.logistics-info-header-left {
  display: flex;
  align-items: center;
}

.logistics-status {
  font-weight: bold;
  font-size: 16px;
  color: #007bff;
}

.logistics-company,
.logistics-no {
  margin-left: 10px;
  font-size: 14px;
  color: #333;
}

.logistics-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 230px;
  overflow-y: auto;
}

.logistics-info-list li {
  display: flex;
  margin-bottom: 10px;
}

.logistics-info-list-time {
  font-size: 12px;
  color: #999;
  width: 80px;
  text-align: right;
  margin-right: 10px;
}

.logistics-info-list-content {
  font-size: 14px;
  color: #333;
}
</style>
